var _EsdDynamicTransformationFunction = function($){
/**
* 命名空间定义
*/
var _EsdDynamicTransformationScript = {};
_EsdDynamicTransformationScript.navBlock = {}; // 定义区域跳转类
_EsdDynamicTransformationScript.navBlock.selector = {};
/**
* 文本链接 a
*/
//保证所有a标签都有href
$("a").each(function(){

var aHref = this.href;
if( aHref=="" || aHref==undefined ){
$(this).attr("href","javascript:void(0)");
}

//给a标签加title
var aTitle = this.title;
var aText = this.text;

if( aTitle=="" || aTitle==undefined ){
if( aText!="" || aText!=undefined ){
$(this).attr("title",$.trim(aText));
}
}

});


//select下的option添加title
$("option").each(function(){
var oTitle = this.title;
var oText = this.text;
if( oTitle=="" || oTitle==undefined ){
if( oText!="" || oText!=undefined ){
$(this).attr("title",$.trim(oText));
}
}
});


//为目录页的翻页添加title
if( $(".CurrChnlCls").length > 0 ){
$('.tyj-fenye #num').attr({'title':'页数', 'placeholder':'页数'});
$('.tyj-fenye .zt12').attr({'title':'跳转按钮', 'placeholder':'跳转按钮'});
}


/**
* 图片处理片段
*/

//首页的，除了公共部分，二级页没加
$('img[src="./images/ybj-logo-20190320.png"]').attr('title','吉林省医疗保障局logo图片').attr('alt','吉林省医疗保障局logo图片');
$('img[src="./images/ybj-xxgkml-20190320.png"]').attr('title','信息公开目录').attr('alt','信息公开目录');
$('img[src="./images/ybj-xxgkzn-20190320.png"]').attr('title','信息公开指南').attr('alt','信息公开指南');
$('img[src="./images/ybj-xxgkndbg-20190320.png"]').attr('title','信息公开年度报告').attr('alt','信息公开年度报告');
$('img[src="./images/ybj-jyta-20190320.png"]').attr('title','建议提案').attr('alt','建议提案');
$('img[src="./fwgk/ypmlcx/ypcx/images/P020190916307179928760.png"]').attr('title','国家医保药品目录（2019版）').attr('alt','国家医保药品目录（2019版）');
$('img[src="./fwgk/ylfwjg/images/P020200313571283687144.png"]').attr('title','吉林省部属、省属医疗服务项目价格').attr('alt','吉林省部属、省属医疗服务项目价格');
$('img[src="./images/ybj-zlxmmlcx-20190320.png"]').attr('title','吉林省诊疗项目目录（暂行）').attr('alt','吉林省诊疗项目目录（暂行）');
$('img[src="./images/ybj-ylhccx-20190320.png"]').attr('title','吉林省医用耗材目录（暂行）').attr('alt','吉林省医用耗材目录（暂行）');
$('img[src="./images/footer-20190320.png"]').attr('title','吉公网安备 22010202000722号').attr('alt','吉公网安备 22010202000722号');
$('img[src="//dcs.conac.cn/image/red.png"]').attr('title','党政机关图标').attr('alt','党政机关图标');
$('img[src="./kzgn/wxgzh/images/P020190522337995807428.png"]').attr('title','微信公众号').attr('alt','微信公众号');
//  $('img[src=""]').attr('title','微信公众号').attr('alt','微信公众号');



//img
$("img").each(function(){
//给图片加alt/title
var imgAlt = this.alt,
imgTitle = this.title,
imgSrc = this.src,
parentText = this.parentElement.text;

if(this.alt=="" || this.alt==undefined){
if(imgTitle!="" && imgTitle!=undefined){
$(this).attr("alt",imgTitle);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("alt",parentText);
}
}
if(this.title=="" || this.title==undefined){
if(imgAlt!="" && imgAlt!=undefined){
$(this).attr("title",imgAlt);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("title",parentText);
}
}
})

$("img").each(function(){
if( (this.alt=="" && this.title=="")||(this.alt==undefined && this.title==undefined) ){
$(this).attr("title","图片");
$(this).attr("alt","图片");
}
})
/**
* 共通头部
*/
$("input[name='searchword']").attr("title","请输入搜索关键词");
$("input[name='searchword']").attr("placeholder","请输入搜索关键词");

$("input[name='navss']").attr("title","搜索");
/**
* 主导航
*/

_EsdDynamicTransformationScript.navTabChange = function (focusObjSelector, listObjSelector, mouseEventObjSelector, keyDownNum, listElementsSelector, prevMouseEventObjSelector, prevListObjsSelector) {
var keydownName = "keydown.navKeydown_" + keyDownNum;
var keydownName2 = keydownName + "_1";
$(focusObjSelector).focus(function () {
if ($(listObjSelector).is(":hidden")) {
$(mouseEventObjSelector).mouseover();
}
$(this).bind(keydownName, function (e) {
if (e.shiftKey && e.keyCode == 9) {
if (prevMouseEventObjSelector != "") {
$(focusObjSelector).mouseout();
$(prevMouseEventObjSelector+" b").mouseover();
$(prevListObjsSelector).last().focus();
$(this).unbind(keydownName);  // 失去焦点时解绑有问题在这解绑一次
return false;
} else{
$(focusObjSelector).mouseout();
$(this).unbind(keydownName);  // 失去焦点时解绑有问题在这解绑一次
}
} else if (e.keyCode == 9) {

}
});

});
$(focusObjSelector).blur(function () {
$(this).unbind(keydownName);
});

$(listElementsSelector).last().focus(function () {
$(this).bind(keydownName2, function (e) {
if (e.shiftKey && e.keyCode == 9) {

} else if (e.keyCode == 9) {
$(mouseEventObjSelector).mouseout();
}
});
});
$(listElementsSelector).last().blur(function () {
$(this).unbind(keydownName2);
});
};


_EsdDynamicTransformationScript.navArray = new Array();

// 导航第一个栏目
_EsdDynamicTransformationScript.nav1 = {}
_EsdDynamicTransformationScript.nav1.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(1) a:first"; //按tab聚焦元素的选择器
_EsdDynamicTransformationScript.nav1.listObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(1) b"; // 按tab聚焦后展示列表选择器 用来判断列表是否已经展示
_EsdDynamicTransformationScript.nav1.mouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(1)"; // 按tab聚焦后展示的列表所使用的鼠标事件绑定的元素
_EsdDynamicTransformationScript.nav1.keyDownNum = 1; // keydown事件标识  最好不要重复
_EsdDynamicTransformationScript.nav1.listElementsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(1) b a"; // 按tab聚焦后 展示列表中a链接的选择器(展示列表中第一个a标签)
_EsdDynamicTransformationScript.nav1.prevMouseEventObjSelector = ""; //上一个相邻的鼠标事件(mouseover)的元素 如果是向上切换没有就使用空字符串""
_EsdDynamicTransformationScript.nav1.prevListObjsSelector = ""; // 上一个相邻的展示列表中a链接的选择器

_EsdDynamicTransformationScript.navArray.push(_EsdDynamicTransformationScript.nav1);  // 放到数组里循环

// 导航第二个栏目
_EsdDynamicTransformationScript.nav2 = {}
_EsdDynamicTransformationScript.nav2.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(2) a:first"; //按tab聚焦元素的选择器
_EsdDynamicTransformationScript.nav2.listObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(2) b"; // 按tab聚焦后展示列表选择器 用来判断列表是否已经展示
_EsdDynamicTransformationScript.nav2.mouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(2)"; // 按tab聚焦后展示的列表所使用的鼠标事件绑定的元素
_EsdDynamicTransformationScript.nav2.keyDownNum = 2; // keydown事件标识  最好不要重复
_EsdDynamicTransformationScript.nav2.listElementsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(2) b a"; // 按tab聚焦后 展示列表中a链接的选择器
_EsdDynamicTransformationScript.nav2.prevMouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(1)"; //上一个相邻的鼠标事件(mouseover)的元素 如果是向上切换没有就使用空字符串""
_EsdDynamicTransformationScript.nav2.prevListObjsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(1) b a"; // 上一个相邻的展示列表中a链接的选择器

_EsdDynamicTransformationScript.navArray.push(_EsdDynamicTransformationScript.nav2);  // 放到数组里循环

// 导航第三个栏目
_EsdDynamicTransformationScript.nav3 = {}
_EsdDynamicTransformationScript.nav3.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(3) a:first"; //按tab聚焦元素的选择器
_EsdDynamicTransformationScript.nav3.listObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(3) b"; // 按tab聚焦后展示列表选择器 用来判断列表是否已经展示
_EsdDynamicTransformationScript.nav3.mouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(3)"; // 按tab聚焦后展示的列表所使用的鼠标事件绑定的元素
_EsdDynamicTransformationScript.nav3.keyDownNum = 3; // keydown事件标识  最好不要重复
_EsdDynamicTransformationScript.nav3.listElementsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(3) b a"; // 按tab聚焦后 展示列表中a链接的选择器
_EsdDynamicTransformationScript.nav3.prevMouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(2)"; //上一个相邻的鼠标事件(mouseover)的元素 如果是向上切换没有就使用空字符串""
_EsdDynamicTransformationScript.nav3.prevListObjsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(2) b a"; // 上一个相邻的展示列表中a链接的选择器

_EsdDynamicTransformationScript.navArray.push(_EsdDynamicTransformationScript.nav3);  // 放到数组里循环

// 导航第四个栏目
_EsdDynamicTransformationScript.nav4 = {}
_EsdDynamicTransformationScript.nav4.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(4) a:first"; //按tab聚焦元素的选择器
_EsdDynamicTransformationScript.nav4.listObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(4) b"; // 按tab聚焦后展示列表选择器 用来判断列表是否已经展示
_EsdDynamicTransformationScript.nav4.mouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(4)"; // 按tab聚焦后展示的列表所使用的鼠标事件绑定的元素
_EsdDynamicTransformationScript.nav4.keyDownNum = 4; // keydown事件标识  最好不要重复
_EsdDynamicTransformationScript.nav4.listElementsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(4) b a"; // 按tab聚焦后 展示列表中a链接的选择器
_EsdDynamicTransformationScript.nav4.prevMouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(3)"; //上一个相邻的鼠标事件(mouseover)的元素 如果是向上切换没有就使用空字符串""
_EsdDynamicTransformationScript.nav4.prevListObjsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(3) b a"; // 上一个相邻的展示列表中a链接的选择器

_EsdDynamicTransformationScript.navArray.push(_EsdDynamicTransformationScript.nav4);  // 放到数组里循环

// 导航第五个栏目
_EsdDynamicTransformationScript.nav5 = {}
_EsdDynamicTransformationScript.nav5.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(5) a:first"; //按tab聚焦元素的选择器
_EsdDynamicTransformationScript.nav5.listObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(5) b"; // 按tab聚焦后展示列表选择器 用来判断列表是否已经展示
_EsdDynamicTransformationScript.nav5.mouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(5)"; // 按tab聚焦后展示的列表所使用的鼠标事件绑定的元素
_EsdDynamicTransformationScript.nav5.keyDownNum = 5; // keydown事件标识  最好不要重复
_EsdDynamicTransformationScript.nav5.listElementsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(5) b a"; // 按tab聚焦后 展示列表中a链接的选择器
_EsdDynamicTransformationScript.nav5.prevMouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(4)"; //上一个相邻的鼠标事件(mouseover)的元素 如果是向上切换没有就使用空字符串""
_EsdDynamicTransformationScript.nav5.prevListObjsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(4) b a"; // 上一个相邻的展示列表中a链接的选择器

_EsdDynamicTransformationScript.navArray.push(_EsdDynamicTransformationScript.nav5);  // 放到数组里循环

//导航第六个栏目
_EsdDynamicTransformationScript.nav6 = {}
_EsdDynamicTransformationScript.nav6.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(6) a:first"; //按tab聚焦元素的选择器
_EsdDynamicTransformationScript.nav6.listObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(6) b"; // 按tab聚焦后展示列表选择器 用来判断列表是否已经展示
_EsdDynamicTransformationScript.nav6.mouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(6)"; // 按tab聚焦后展示的列表所使用的鼠标事件绑定的元素
_EsdDynamicTransformationScript.nav6.keyDownNum = 6; // keydown事件标识  最好不要重复
_EsdDynamicTransformationScript.nav6.listElementsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(6) b a"; // 按tab聚焦后 展示列表中a链接的选择器
_EsdDynamicTransformationScript.nav6.prevMouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(5)"; //上一个相邻的鼠标事件(mouseover)的元素 如果是向上切换没有就使用空字符串""
_EsdDynamicTransformationScript.nav6.prevListObjsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(5) b a"; // 上一个相邻的展示列表中a链接的选择器

_EsdDynamicTransformationScript.navArray.push(_EsdDynamicTransformationScript.nav6);  // 放到数组里循环


for(var i=0; i<_EsdDynamicTransformationScript.navArray.length; i++){
_EsdDynamicTransformationScript.navTabChange(_EsdDynamicTransformationScript.navArray[i].focusObjSelector, _EsdDynamicTransformationScript.navArray[i].listObjSelector,
_EsdDynamicTransformationScript.navArray[i].mouseEventObjSelector, _EsdDynamicTransformationScript.navArray[i].keyDownNum, _EsdDynamicTransformationScript.navArray[i].listElementsSelector,
_EsdDynamicTransformationScript.navArray[i].prevMouseEventObjSelector, _EsdDynamicTransformationScript.navArray[i].prevListObjsSelector);
}


//导航第七个栏目
_EsdDynamicTransformationScript.nav7 = {}
_EsdDynamicTransformationScript.nav7.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(7) a:first"; //按tab聚焦元素的选择器


_EsdDynamicTransformationScript.navArrayy = new Array();

//导航第八个栏目
_EsdDynamicTransformationScript.nav8 = {}
_EsdDynamicTransformationScript.nav8.focusObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(8) a:first"; //按tab聚焦元素的选择器
_EsdDynamicTransformationScript.nav8.listObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(8) b"; // 按tab聚焦后展示列表选择器 用来判断列表是否已经展示
_EsdDynamicTransformationScript.nav8.mouseEventObjSelector = ".ybj-nav-20190320 .nav-box1 li:eq(8)"; // 按tab聚焦后展示的列表所使用的鼠标事件绑定的元素
_EsdDynamicTransformationScript.nav8.keyDownNum = 8; // keydown事件标识  最好不要重复
_EsdDynamicTransformationScript.nav8.listElementsSelector = ".ybj-nav-20190320 .nav-box1 li:eq(8) b a"; // 按tab聚焦后 展示列表中a链接的选择器(展示列表中第一个a标签)
_EsdDynamicTransformationScript.nav8.prevMouseEventObjSelector = ""; //上一个相邻的鼠标事件(mouseover)的元素 如果是向上切换没有就使用空字符串""
_EsdDynamicTransformationScript.nav8.prevListObjsSelector = ""; // 上一个相邻的展示列表中a链接的选择器

_EsdDynamicTransformationScript.navArrayy.push(_EsdDynamicTransformationScript.nav8);  // 放到数组里循环

for(var i=0; i<_EsdDynamicTransformationScript.navArrayy.length; i++){
_EsdDynamicTransformationScript.navTabChange(_EsdDynamicTransformationScript.navArrayy[i].focusObjSelector, _EsdDynamicTransformationScript.navArrayy[i].listObjSelector,
_EsdDynamicTransformationScript.navArrayy[i].mouseEventObjSelector, _EsdDynamicTransformationScript.navArrayy[i].keyDownNum, _EsdDynamicTransformationScript.navArrayy[i].listElementsSelector,
_EsdDynamicTransformationScript.navArrayy[i].prevMouseEventObjSelector, _EsdDynamicTransformationScript.navArrayy[i].prevListObjsSelector);
}


//第七个倒切
$(_EsdDynamicTransformationScript.nav7.focusObjSelector).focus(function (e) {
$(this).bind("keydown.keydown_nav7", function (e) {
if(e.shiftKey&&e.keyCode==9){
$(_EsdDynamicTransformationScript.nav6.focusObjSelector).mouseover();
$(_EsdDynamicTransformationScript.nav6.listElementsSelector).last().focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
$(_EsdDynamicTransformationScript.nav7.focusObjSelector).blur(function () {
$(this).unbind("keydown.keydown_nav7");
});

//nav下面的第一个a倒切
$(".box-w1200:eq(2) a:first").focus(function (e) {
$(this).bind("keydown.keydown_nav9", function (e) {
if(e.shiftKey&&e.keyCode==9){
$(_EsdDynamicTransformationScript.nav8.focusObjSelector).mouseover();
$(_EsdDynamicTransformationScript.nav8.listElementsSelector).last().focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
$(".box-w1200:eq(2) a:first").blur(function () {
$(this).unbind("keydown.keydown_nav9");
});









/**
* 网站所有幻灯片
*/


var part_First = function(){

//轮播,右下角原点--鼠标点击触发情况

//轮播：只获取轮播中一个a标签。
//以文字a标签为主，图片a标签尽量不要，title不稳定

//轮播前的标签
_EsdDynamicTransformationScript.esdTagFrontNum1 = $("#ybj-home_slider a:first");

//文字A标签
_EsdDynamicTransformationScript.esdTagANum1 = $("#ybj-home_slider .flex-viewport .slides li:eq(1) .caption a");
_EsdDynamicTransformationScript.esdTagANum2 = $("#ybj-home_slider .flex-viewport .slides li:eq(2) .caption a");
_EsdDynamicTransformationScript.esdTagANum3 = $("#ybj-home_slider .flex-viewport .slides li:eq(3) .caption a");
_EsdDynamicTransformationScript.esdTagANum4 = $("#ybj-home_slider .flex-viewport .slides li:eq(4) .caption a");
_EsdDynamicTransformationScript.esdTagANum5 = $("#ybj-home_slider .flex-viewport .slides li:eq(5) .caption a");

//原点
_EsdDynamicTransformationScript.esdTagCircleNum1 = $("#ybj-home_slider .flex-control-nav li:eq(0) a");
_EsdDynamicTransformationScript.esdTagCircleNum2 = $("#ybj-home_slider .flex-control-nav li:eq(1) a");
_EsdDynamicTransformationScript.esdTagCircleNum3 = $("#ybj-home_slider .flex-control-nav li:eq(2) a");
_EsdDynamicTransformationScript.esdTagCircleNum4 = $("#ybj-home_slider .flex-control-nav li:eq(3) a");
_EsdDynamicTransformationScript.esdTagCircleNum5 = $("#ybj-home_slider .flex-control-nav li:eq(4) a");

//轮播后的标签
_EsdDynamicTransformationScript.esdTagAfterNum1 = $(".ybj-banner .tab-xxk a:first");


//轮播前的焦点
_EsdDynamicTransformationScript.esdTagFrontNum1.focus(function (e) {
$(this).bind("keydown.keydown_0", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum1.click();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagFrontNum1.blur(function () {
$(this).unbind("keydown.keydown_0");
});

//第一块
_EsdDynamicTransformationScript.esdTagANum1.focus(function (e) {
$(this).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum2.click();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum1.blur(function () {
$(this).unbind("keydown.keydown_1");
});

//第二块
_EsdDynamicTransformationScript.esdTagANum2.focus(function (e) {
$(this).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum1.click();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum3.click();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum2.blur(function () {
$(this).unbind("keydown.keydown_2");
});

//第三块
_EsdDynamicTransformationScript.esdTagANum3.focus(function (e) {
$(this).bind("keydown.keydown_3", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum2.click();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum4.click();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum3.blur(function () {
$(this).unbind("keydown.keydown_3");
});

//第四块
_EsdDynamicTransformationScript.esdTagANum4.focus(function (e) {
$(this).bind("keydown.keydown_4", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum3.click();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum5.click();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum4.blur(function () {
$(this).unbind("keydown.keydown_4");
});

//第五块
_EsdDynamicTransformationScript.esdTagANum5.focus(function (e) {
$(this).bind("keydown.keydown_5", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum4.click();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagAfterNum1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum5.blur(function () {
$(this).unbind("keydown.keydown_5");
});

//轮播后的焦点
_EsdDynamicTransformationScript.esdTagAfterNum1.focus(function (e) {
$(this).bind("keydown.keydown_6", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum5.click();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esdTagAfterNum1.blur(function () {
$(this).unbind("keydown.keydown_6");
});


}



if(location.href=="http://ybj.jl.gov.cn/index.html" || location.href=="http://ybj.jl.gov.cn/"){


// 总计时器，保证目标加载完毕再执行js（轮播+审计要闻）
_EsdDynamicTransformationScript.intervalYbj = setInterval(function(){

if( ( $("#ybj-home_slider .flex-control-nav li:eq(4) a") != undefined )
&& ( $(".ybj-banner .tab-xxk > dd:eq(0) a:last") != undefined )
&& ( $("#testUl a:first") != undefined )
&& ( $(".mt-20 .ybj-w771 .tab-xxk > dd:eq(0) a:last") != undefined ) ){
clearInterval(_EsdDynamicTransformationScript.intervalYbj);

part_First();
part_Second();
part_Third();
part_Forth();

}

}, 500);

//两个二级选项卡，一个三级选项卡
var part_Second = function(){

//二级选项卡---国家新闻
//各个选项名称
_EsdDynamicTransformationScript.esd2TagNum1 = $(".ybj-banner .tab-xxk .ybj_ty a:eq(0)");
_EsdDynamicTransformationScript.esd2TagNum2 = $(".ybj-banner .tab-xxk .ybj_ty a:eq(1)");

//各个选项中的第一个内容
_EsdDynamicTransformationScript.esd2TagNum1Content1 = $(".ybj-banner .tab-xxk > dd:eq(0) a:first");
_EsdDynamicTransformationScript.esd2TagNum2Content1 = $(".ybj-banner .tab-xxk > dd:eq(1) a:first");

//各个选项中的最后一个内容
_EsdDynamicTransformationScript.esd2TagNum1ContentN = $(".ybj-banner .tab-xxk > dd:eq(0) a:last");
_EsdDynamicTransformationScript.esd2TagNum2ContentN = $(".ybj-banner .tab-xxk > dd:eq(1) a:last");

//第一块
_EsdDynamicTransformationScript.esd2TagNum1.focus(function (e) {
e = $(this).mouseover();
$(this).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum1Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum1.blur(function () {
$(this).unbind("keydown.keydown_1");
});

_EsdDynamicTransformationScript.esd2TagNum1Content1.focus(function () {
$(this).bind("keydown.keydown_s1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum1.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd2TagNum1Content1.blur(function () {
$(this).unbind("keydown.keydown_s1");
});

_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus(function () {
$(this).bind("keydown.keydown_e1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum2.mouseover();
_EsdDynamicTransformationScript.esd2TagNum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum1ContentN.blur(function () {
$(this).unbind("keydown.keydown_e1");
});

//第二块
_EsdDynamicTransformationScript.esd2TagNum2.focus(function (e) {
$(this).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd2TagNum1.mouseover();
_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum2Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum2.blur(function () {
$(this).unbind("keydown.keydown_2");
});

_EsdDynamicTransformationScript.esd2TagNum2Content1.focus(function () {
$(this).bind("keydown.keydown_s2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum2.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd2TagNum2Content1.blur(function () {
$(this).unbind("keydown.keydown_s2");
});


}

var part_Third = function(){

//二级选项卡---重要信息转载
//各个选项名称
_EsdDynamicTransformationScript.esd3TagNum1 = $(".mt-22 .ybj-w771 .tab-xxk .ybj_ty a:eq(0)");
_EsdDynamicTransformationScript.esd3TagNum2 = $(".mt-22 .ybj-w771 .tab-xxk .ybj_ty a:eq(1)");

//各个选项中的第一个内容
_EsdDynamicTransformationScript.esd3TagNum1Content1 = $("#testUl a:first");
_EsdDynamicTransformationScript.esd3TagNum2Content1 = $("#testUl2 a:first");

//各个选项中的最后一个内容
_EsdDynamicTransformationScript.esd3TagNum1ContentN = $("#testUl a:last");
_EsdDynamicTransformationScript.esd3TagNum2ContentN = $("#testUl2 a:last");

//第一块
_EsdDynamicTransformationScript.esd3TagNum1.focus(function (e) {
e = $(this).mouseover();
$(this).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd3TagNum1Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd3TagNum1.blur(function () {
$(this).unbind("keydown.keydown_1");
});

_EsdDynamicTransformationScript.esd3TagNum1Content1.focus(function () {
$(this).bind("keydown.keydown_s1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd3TagNum1.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd3TagNum1Content1.blur(function () {
$(this).unbind("keydown.keydown_s1");
});

_EsdDynamicTransformationScript.esd3TagNum1ContentN.focus(function () {
$(this).bind("keydown.keydown_e1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd3TagNum2.mouseover();
_EsdDynamicTransformationScript.esd3TagNum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd3TagNum1ContentN.blur(function () {
$(this).unbind("keydown.keydown_e1");
});

//第二块
_EsdDynamicTransformationScript.esd3TagNum2.focus(function (e) {
$(this).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd3TagNum1.mouseover();
_EsdDynamicTransformationScript.esd3TagNum1ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd3TagNum2Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd3TagNum2.blur(function () {
$(this).unbind("keydown.keydown_2");
});

_EsdDynamicTransformationScript.esd3TagNum2Content1.focus(function () {
$(this).bind("keydown.keydown_s2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd3TagNum2.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd3TagNum2Content1.blur(function () {
$(this).unbind("keydown.keydown_s2");
});


}
var part_Forth = function(){

//三级选项卡---政策
//各个选项名称
_EsdDynamicTransformationScript.esd4TagNum1 = $(".mt-20 .ybj-w771 .tab-xxk .ybj_ty a:eq(0)");
_EsdDynamicTransformationScript.esd4TagNum2 = $(".mt-20 .ybj-w771 .tab-xxk .ybj_ty a:eq(1)");
_EsdDynamicTransformationScript.esd4TagNum3 = $(".mt-20 .ybj-w771 .tab-xxk .ybj_ty a:eq(2)");

//各个选项中的第一个内容
_EsdDynamicTransformationScript.esd4TagNum1Content1 = $(".mt-20 .ybj-w771 .tab-xxk > dd:eq(0) a:first");
_EsdDynamicTransformationScript.esd4TagNum2Content1 = $(".mt-20 .ybj-w771 .tab-xxk > dd:eq(1) a:first");
_EsdDynamicTransformationScript.esd4TagNum3Content1 = $(".mt-20 .ybj-w771 .tab-xxk > dd:eq(2) a:first");

//各个选项中的最后一个内容
_EsdDynamicTransformationScript.esd4TagNum1ContentN = $(".mt-20 .ybj-w771 .tab-xxk > dd:eq(0) a:last");
_EsdDynamicTransformationScript.esd4TagNum2ContentN = $(".mt-20 .ybj-w771 .tab-xxk > dd:eq(1) a:last");
_EsdDynamicTransformationScript.esd4TagNum3ContentN = $(".mt-20 .ybj-w771 .tab-xxk > dd:eq(2) a:last");

//第一块
_EsdDynamicTransformationScript.esd4TagNum1.focus(function (e) {
e = $(this).mouseover();
$(this).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum1Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd4TagNum1.blur(function () {
$(this).unbind("keydown.keydown_1");
});

_EsdDynamicTransformationScript.esd4TagNum1Content1.focus(function () {
$(this).bind("keydown.keydown_s1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum1.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd4TagNum1Content1.blur(function () {
$(this).unbind("keydown.keydown_s1");
});

_EsdDynamicTransformationScript.esd4TagNum1ContentN.focus(function () {
$(this).bind("keydown.keydown_e1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum2.mouseover();
_EsdDynamicTransformationScript.esd4TagNum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd4TagNum1ContentN.blur(function () {
$(this).unbind("keydown.keydown_e1");
});

//第二块
_EsdDynamicTransformationScript.esd4TagNum2.focus(function (e) {
$(this).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd4TagNum1.mouseover();
_EsdDynamicTransformationScript.esd4TagNum1ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum2Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd4TagNum2.blur(function () {
$(this).unbind("keydown.keydown_2");
});

_EsdDynamicTransformationScript.esd4TagNum2Content1.focus(function () {
$(this).bind("keydown.keydown_s2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum2.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd4TagNum2Content1.blur(function () {
$(this).unbind("keydown.keydown_s2");
});

_EsdDynamicTransformationScript.esd4TagNum2ContentN.focus(function () {
$(this).bind("keydown.keydown_e2", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum3.mouseover();
_EsdDynamicTransformationScript.esd4TagNum3.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd4TagNum2ContentN.blur(function () {
$(this).unbind("keydown.keydown_e2");
});

//第三块
_EsdDynamicTransformationScript.esd4TagNum3.focus(function (e) {
$(this).bind("keydown.keydown_3", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd4TagNum2.mouseover();
_EsdDynamicTransformationScript.esd4TagNum2ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum3Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd4TagNum3.blur(function () {
$(this).unbind("keydown.keydown_3");
});

_EsdDynamicTransformationScript.esd4TagNum3Content1.focus(function () {
$(this).bind("keydown.keydown_s3", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd4TagNum3.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd4TagNum3Content1.blur(function () {
$(this).unbind("keydown.keydown_s3");
});

}














}

/**
* 二级页
*/

//-------------------------二级页----------------------------------
if(location.href=="http://ybj.jl.gov.cn/hdjl/ywzx/"){

_EsdDynamicTransformationScript.iframeInputInterval = setInterval(function(){
if(document.getElementsByTagName("iframe")[0].contentWindow.document.getElementsByTagName("input")[0]!=undefined){
clearInterval(_EsdDynamicTransformationScript.iframeInputInterval);

var inputIframe = document.getElementsByTagName("iframe")[0].contentWindow.document;

$(inputIframe).find("#frmData input:eq(0)").attr({placeholder:"姓名"});
$(inputIframe).find("#frmData input:eq(1)").attr({placeholder:"联系电话"});
$(inputIframe).find("#frmData input:eq(2)").attr({placeholder:"电子邮件"});
$(inputIframe).find("#frmData input:eq(3)").attr({placeholder: "联系地址"});
$(inputIframe).find("#frmData input:eq(4)").attr({placeholder: "标题"});
$(inputIframe).find("#frmData input:eq(5)").attr({title: "公开",placeholder: "公开"});
$(inputIframe).find("#frmData input:eq(6)").attr({title: "不公开",placeholder: "不公开"});

$(inputIframe).find("#frmData textarea:eq(0)").attr({placeholder:"内容"});

$(inputIframe).find("#SubmitButton").attr({title: "提交",placeholder: "提交"});
$(inputIframe).find("#ResetButton").attr({title: "提交",placeholder: "重置"});

}
}, 500);

}

if(location.href=="http://ybj.jl.gov.cn/hdjl/tsjb/"){

_EsdDynamicTransformationScript.iframeInputInterval = setInterval(function(){
if(document.getElementsByTagName("iframe")[0].contentWindow.document.getElementsByTagName("input")[0]!=undefined){
clearInterval(_EsdDynamicTransformationScript.iframeInputInterval);

var inputIframe = document.getElementsByTagName("iframe")[0].contentWindow.document;

$(inputIframe).find("#frmData input:eq(0)").attr({placeholder:"姓名"});
$(inputIframe).find("#frmData input:eq(1)").attr({placeholder:"联系电话"});
$(inputIframe).find("#frmData input:eq(2)").attr({placeholder:"电子邮件"});
$(inputIframe).find("#frmData input:eq(3)").attr({placeholder: "联系地址"});
$(inputIframe).find("#frmData input:eq(4)").attr({placeholder: "标题"});

$(inputIframe).find("#frmData textarea:eq(0)").attr({placeholder:"内容"});

$(inputIframe).find("#SubmitButton").attr({title: "提交",placeholder: "提交"});
$(inputIframe).find("#ResetButton").attr({title: "提交",placeholder: "重置"});

}
}, 500);

}













/**
* 共通底部处理
*/
//定义跳转 使用jquery选择器语法
//主要修改部分把网站对应的选择器赋值给相应的变量。或用jquery把默认的id复制给网站的元素****************************此处重要位置修改
_EsdDynamicTransformationScript.navBlock.selector.top = ".ybj-nav";
_EsdDynamicTransformationScript.navBlock.selector.nav = ".ybj-nav-20190320";
_EsdDynamicTransformationScript.navBlock.selector.footer = ".foot-w100";

if(location.href=="http://ybj.jl.gov.cn/" || location.href=="http://ybj.jl.gov.cn/index.html"){

_EsdDynamicTransformationScript.navBlock.selector.main = ".top-title";
_EsdDynamicTransformationScript.navBlock.selector.left = "";
_EsdDynamicTransformationScript.navBlock.selector.right = "";
_EsdDynamicTransformationScript.navBlock.selector.content = "";

$(".top-title").addClass("navBlock");
$("#ybj-home_slider").addClass("navBlock");
$(".ybj-banner .tab-xxk").addClass("navBlock");
$(".ybj-center-banner").addClass("navBlock");
$(".mt-22 .ybj-w771").addClass("navBlock");
$(".mt-22 .ybj-w389").addClass("navBlock");
$(".mt-20 > div").addClass("navBlock");
$(".mt-20 .ybj-w771 .ybj-xx").addClass("navBlock");
$(".moreload").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个

}


//有面包屑导航的，非首页
if( $(".CurrChnlCls").length > 0 ){
_EsdDynamicTransformationScript.navBlock.selector.main = ".mt-25:eq(1)";
_EsdDynamicTransformationScript.navBlock.selector.left = ".mt-25:eq(1) .fl";
_EsdDynamicTransformationScript.navBlock.selector.right = ".mt-25:eq(1) .fr";
_EsdDynamicTransformationScript.navBlock.selector.content = ".ybj-page";

$(".mt-25:eq(1) .fl").addClass("navBlock");
$(".mt-25:eq(1) .fr").addClass("navBlock");
$(".ybj-page").addClass("navBlock");
$(".mt-25:eq(0)").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}





/**
* 区域导航、调试开关
*/

$(document).bind("keydown.keydown_9001", function(e) {
if (e.shiftKey && e.keyCode == 20) {
$("*").focus(function() {
$(this).css({
"outline" : "2px dashed red"
});
});
$("*").blur(function() {
$(this).css({
"outline" : "0px black"
});
});
}
});

_EsdDynamicTransformationScript.navBlock.debug = true; // 是否是调试模式，调试模式有红边线，非调试模式关闭红边框
_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; // 激活的采用class因为会激活多个
// 快捷键定义区
//_EsdDynamicTransformationScript.navBlock.key = {};

//_EsdDynamicTransformationScript.navBlock.key.top = "alt+1"; // (top)
//_EsdDynamicTransformationScript.navBlock.key.nav = "alt+2"; // (nav)
//_EsdDynamicTransformationScript.navBlock.key.main = "alt+3"; // (main)
//_EsdDynamicTransformationScript.navBlock.key.content = "alt+4"; // (content)
//_EsdDynamicTransformationScript.navBlock.key.left = "alt+5"; // (left)
//_EsdDynamicTransformationScript.navBlock.key.right = "alt+6"; // (right)
//_EsdDynamicTransformationScript.navBlock.key.footer = "alt+7"; // (footer)
//_EsdDynamicTransformationScript.navBlock.key.down = "alt+8"; // (down)
//_EsdDynamicTransformationScript.navBlock.key.up = "alt+9"; // (up);

// 以下变量主要用于区块跳转
_EsdDynamicTransformationScript.navBlock.sIndex = -1; // 当前栏目下标
_EsdDynamicTransformationScript.navBlock.maxIndex = -1; // 保存目前所有class="navBlock"的区域块总数量，栏目总量下标。
_EsdDynamicTransformationScript.navBlock.minIndex = 0; // 栏目数量起始下标

// 主要代码区域

// 导航跳转
_EsdDynamicTransformationScript.navBlock.keyShowSelect = function(i) {
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, el) {
if (i == index) {
_EsdDynamicTransformationScript.navBlock.debugView(el);
$(el).find("a").each(function(i, e) {
if (i == 0) {
$(e).focus();
}
});

}
});
}

// 获取所有class=navBlock的区域的总数量，初始化轮训所有需要跳转的块
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, ehx) {
_EsdDynamicTransformationScript.navBlock.maxIndex++;
});



// 快捷键功能区域
// 跳转到头部alt+1(49)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 49) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.top);
}

});
// 跳转到导航alt+2(50)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 50) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.nav);
}

});
// 跳转到主要区域alt+3(51)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 51) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.main);
}
});

// 跳转到正文区域alt+4(52)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 52) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.content);
}
});

// 跳转到左区域alt+5(53)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 53) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.left);
}
});

// 跳转到右区域alt+6(54)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 54) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.right);
}
});
// 跳转到底部alt+7(55)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 55) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.footer);
}
});
//前进alt+8(56)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 56) {
if (_EsdDynamicTransformationScript.navBlock.sIndex < _EsdDynamicTransformationScript.navBlock.maxIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex++;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});

// 后退alt+9(57)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 57) {
if (_EsdDynamicTransformationScript.navBlock.sIndex > _EsdDynamicTransformationScript.navBlock.minIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex--;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});
// 特定区域跳转
_EsdDynamicTransformationScript.navBlock.keySelectScroll = function(id) {
if ($(id).length > 0) {
_EsdDynamicTransformationScript.navBlock.appendIns(id,true);//插入ins
_EsdDynamicTransformationScript.navBlock.debugView(id);
$(id).find("a").each(function(index) {
if (index == 0) {
$(this).focus();
}
});
_EsdDynamicTransformationScript.navBlock.appendIns(id,false);//清楚ins
} else {
}

}
//为了解决漂浮高等于0的情况下区域显示是一条线
_EsdDynamicTransformationScript.navBlock.appendIns=function(id,b){
if(b==true){
$(id).append("<ins id='esdNavBlockIns' style='clear: both;display: block;'></ins>")
}else{
$("#esdNavBlockIns").remove();
}
}

if (_EsdDynamicTransformationScript.navBlock.debug == true) {
// 如果开启调试模式，添加调试绘制矩形边线
$("body").append("<div id='show_top' class='lineshow'></div>");
$("body").append("<div id='show_bottom' class='lineshow'></div>");
$("body").append("<div id='show_left' class='lineshow'></div>");
$("body").append("<div id='show_right' class='lineshow'></div>");
$(".lineshow").css({
"display" : "none"
});
}
// 开启调试模式后会显示红边
_EsdDynamicTransformationScript.navBlock.debugView = function(e) {
if (_EsdDynamicTransformationScript.navBlock.debug == true) {
var x = $(e).offset();
//var w = parseInt($(e).css("width"));
var w = $(e).outerWidth();//返回元素的宽度（包含 padding 和 border）
//var h = parseInt($(e).css("height"));
var h = $(e).outerHeight();//返回元素的高度（包含 padding 和 border）
$("#show_top").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_bottom").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top + h,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_left").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : "0px",
"height" : h
});
$("#show_right").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left + w,
"width" : "0px",
"height" : h
});
$("html,body").animate({
scrollTop : $("#show_top").offset().top
}, 200);
$(".lineshow").css({
"display" : "block"
});
}
}
};
/**
* 主入口方法
*/

if (window.jQuery == undefined) {
var wzaInitInterval = setInterval(function(){
if(document.body!=null){
clearInterval(wzaInitInterval);
//			var originalWindowOnload = null;
//			if(window.onload!=null){
//				originalWindowOnload = window.onload;
//			}
document.body.onload = function(){
//				originalWindowOnload();
var esdJquery = document.createElement("script");
esdJquery.setAttribute("type", "text/javascript");
esdJquery.setAttribute("src", window.location.protocol + "//" + window.location.href.split("/")[2] + "/wza/bwscript/jquery-1.12.4.min.js");
esdJquery.setAttribute("charset", "utf-8");
esdJquery.setAttribute("id", "ESDWebAppInnerIframe");
document.body.appendChild(esdJquery);
var jqueryLoadInterval = setInterval(function () {
if (window.jQuery != undefined) {
clearInterval(jqueryLoadInterval);
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//						_EsdDynamicTransformationFunction(jQuery)
}
}, 500);
};
}
}, 10);
} else {
jQuery(function(){
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//		_EsdDynamicTransformationFunction(jQuery)
})

}
